<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>





        console.log('start');
        setTimeout(function () {
            console.log('你猜我输出在哪');
        }, 0);
        console.log('end');
        for (var i = 0; i < 10; i++) {
            console.log(i);
        }

        //4 - 看如下代码, 说出运行结果

        // console.log('start');
        // for (var i = 0; i < 3; i++) {
        //     (function (index) {
        //         setTimeout(function () {
        //             console.log(index);
        //         }, 0);
        //     })(i);
        // }
        // console.log('end'); 
    </script>
</body>

</html>